home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Programmation / Gooey1.3.1 / Docs & Compile Hints / THINK C 7.0 Hints < prev    next >
Text File  |  1995-02-06  |  6KB  |  186 lines

  1. THINK C 7.0
  2.  
  3. There is a file named "Symantec Setup" in the "C Templates folder. Delete the file
  4. named "Setup" in this folder.  Make a copy of the "Symantec Setup" file and then
  5. rename this copy to "Setup".
  6.  
  7. This will make sure that the file types of the source code generated is the correct
  8. creator, so Metrowerks will be launched automatically when double-clicking on one
  9. of these files.
  10.  
  11.  
  12.  
  13. After generating code for the first time, for your new prototype, follow this method to 
  14. get THINK C up and working for you:
  15.  
  16. CREATING A THINK PROJECT...
  17.  
  18. Ñ Find the 'Sources" folder made by the Code Generator.
  19. Ñ Open the "Sources" folder.
  20. Ñ Open the "mm" folder inside the "Sources" folder.
  21. Ñ Double click on any of the files you see there, this will automatically launch THINK C.
  22. Ñ Select the "New Project" menu item.
  23. Ñ Select the "Empty Project" type and uncheck the "Create folder" checkbox.
  24. Ñ╩When THINK C brings up a save dialog, it is asking you to name the new THINK C project 
  25. you are making.  Change the folder level to one up, the "Sources" folder instead of the 
  26. "mm" folder.  Now enter your project name, using Option-P for the "╣" part of the name, 
  27. e.g. MyProgram.╣
  28. Ñ Close the one file that THINK C opened for you.
  29. Ñ Select the project window.
  30.  
  31.  
  32.  
  33. ADDING Gooey SPECIFIC FILES...
  34.  
  35. Ñ Click on the "main.c" file to select it. This will put the added sources into that
  36. segment.
  37.  
  38. Ñ Under the "Source" menu, select the "Add Files..." menu item.
  39.  
  40. Ñ Open the "mm" folder, from the Add dialog.
  41.  
  42. Ñ Press the "Add All" button, this will select every file in this "mm" dialog.
  43.  
  44. Ñ Press the "Done" button, this will now add them all to your project.
  45.  
  46. Ñ╩Make the project window taller if necessary, for extra empty space at the bottom.
  47.  
  48. Ñ Click on the "main.c" file to select it.  Under the "Source" menu select the
  49. "Remove" menu item.
  50.  
  51. Ñ Press the mouse below the "Totals" message line.  This selects a new segment for the next 
  52. files to go into.
  53.  
  54.  
  55.  
  56. ADDING user SPECIFIC FILES...
  57.  
  58. Ñ Under the "Source" menu, select the "Add Files..." menu item.
  59.  
  60. Ñ Go up one level, from the "mm" folder into the "Source" folder.
  61.  
  62. Ñ Open the "resources" folder, from the Add dialog.
  63.  
  64. Ñ Select the file starting with "Rez_" and ending in ".r". This is the Rez file.
  65.  
  66. Ñ Press the "Add" button.
  67.  
  68. Ñ Go up one level, from the "resources" folder into the "Sources" folder.
  69.  
  70. Ñ Open the "u" folder, from the Add dialog.
  71.  
  72. Ñ Press the "Add All" button, this will select every file in this "u" dialog.
  73.  
  74. Ñ Press the "Done" button, this will now add them all to your project.
  75.  
  76.  
  77.  
  78. ADDING THINK LIBRARIES...
  79.  
  80. Ñ Press the mouse on the "MacTraps" file.  This selects a new segment for the next 
  81. files to go into.
  82.  
  83. Ñ Under the "Source" menu, select the "Add Files..." menu item.
  84.  
  85. Ñ Locate your THINK C folder.  Locate the "Mac Libraries" folder, open it up.
  86.  
  87. Ñ Select "MacTraps2" and press the "Add" button.
  88.  
  89. Ñ Press the "Done" button, this will now add them all to your project.
  90.  
  91.  
  92.  
  93. SETTING UP THE PROJECT...
  94.  
  95. Ñ Under the "Project" menu, select the "Set Project Type..." menu item.
  96.  
  97. Ñ Change the partition size to something larger, like 1024K.
  98.  
  99. Ñ Change the "SIZE Flags" to be "5A80" to start off with.
  100.  
  101. Ñ╩Press the "OK" button.
  102.  
  103.  
  104.  
  105. Ñ Set all your THINK C preferences, I recommend turning on "Require Prototypes".
  106.  
  107.  
  108. PRECOMPILED HEADERS...
  109.  
  110. Ñ Open the "mmHeaders.c" file. Click on this file to select it.
  111.  
  112. Ñ Under the "Source" menu select the "Precompile╔" menu item.
  113.  
  114. Ñ Save the precompiled headers under the "mmHeaders68K" name.
  115.  
  116. Ñ Close the "mmHeaders.c"file.
  117.  
  118.  
  119. Ñ Set your THINK C  prefix preferences to say:
  120. #include "mmHeaders68K"
  121.  
  122.  
  123.  
  124. Ñ Under the "Project" menu, select the "Bring Up To Date" menu item. This will compile 
  125. all the files.
  126.  
  127. Ñ For 68K only. If the main segment, the top one, is larger than 32K then create new 
  128. segments and drag some of the files into it.
  129.  
  130. Ñ Under the "Project" menu, select the "Check Link" menu item. This will tell you if 
  131. any files are missing.
  132.  
  133.  
  134.  
  135. CODING...
  136.  
  137. Ñ Make your changes to any file that does not start with "mm".  All the other files hook 
  138. into the "mm" files to provide you with access.
  139.  
  140.  
  141.  
  142.  
  143. RE-GENERATION.  After making changes or additions to your prototype.
  144.  
  145. Ñ Generate all sources again.  This will make a new folder named "Sources" or  "Sources" 
  146. with a number after it if that folder alreay exists.
  147.  
  148. Ñ Drag the "mm" folder from the newly generated folder into your working folder. 
  149. NOTE: This replaces your older "mm" folder.  If you have made changes to any "mm" files, 
  150. you should never need to, then drag them into another folder first.
  151.  
  152. Ñ Drag the "mmXXX.rsrc" file from the new "resources" folder into your working "resources" 
  153. folder.
  154.  
  155. Ñ Drag the "XXXX.╣.rsrc" file from your "Sources" folder into the trash can, you want 
  156. THINK C to make a new one using the new resource file.
  157.  
  158. Ñ Empty the trash.
  159.  
  160.  
  161. If you added a new Window, Dialog, or Alert then drag that corresponding file from the new 
  162. "u" folder into your working "u" folder.  If you are asked about replacing a file then 
  163. say "No", you got the wrong file.
  164.  
  165.  
  166. If you added a menu then open your "menuXXX.h" file and the new "menuXXX.h". Copy over the 
  167. prototype for the new menu.  Open your "menuXXX.c" file and the new "menuXXX.c".  Copy over 
  168. the routine for the new menu.
  169.  
  170. If you added a button or other control then let THINK find any additional routines for you, 
  171. in error messages.
  172.  
  173.  
  174.  
  175. Ñ Under the "Project" menu, select the "Remove Objects" menu item. This will make sure that 
  176. all files will be recompiled. 
  177.  
  178. Ñ Under the "Project" menu, select the "Bring Up To Date" menu item. This will compile all 
  179. the files.
  180.  
  181. If there are errors involving new routines, like a checkbox handler routine where there were 
  182. no check boxes before.  Open the old corresponding "xxx.h" file, from the "u" folder. Open 
  183. the new "xxx.h" file, copy the new prototype over.  Open the "xxx.c" files and copy over 
  184. the new routine.
  185.  
  186.